package com.yunxi.bizToHub.pojo;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import lombok.Data;

import java.io.Serializable;

/**
 * Created by Administrator on 2019/5/27.
 */
@Data
public class OtdModelVO implements Serializable {
    //	配置识别码
    private String package_no;
    //	变量车型编码
    private String car_model;
    //	特征族编码
    private String family_code;
    //	特征值编码
    private String atwrt;


    public static List<OtdModelVO> createModelVO(Map<String, String> configMap, String packageNo, String vehicleCode) {
        List<OtdModelVO> modelVOS = new ArrayList<>();
        configMap.forEach((familyCode, featureCode) -> {
            OtdModelVO modelVO = new OtdModelVO();
            modelVO.setPackage_no(packageNo);
            modelVO.setCar_model(vehicleCode);
            modelVO.setFamily_code(familyCode);
            modelVO.setAtwrt(featureCode);
            modelVOS.add(modelVO);
        });
        return modelVOS;
    }
}
